package com.cdd.goods.mapper;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.common.entity.Goods;
import com.common.entity.Newgoods;
import com.common.vo.GoodsVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lzl
 * @since 2022-09-01
 */
public interface GoodsMapper extends BaseMapper<Goods> {


    Page<GoodsVo> selectGoodsAll(Page<GoodsVo> page, @Param("ew") QueryWrapper queryWrapper);


    List<GoodsVo> selectGoodsZone(@Param("ew") QueryWrapper<Goods> queryWrapper);

    Integer addNewGoods(Newgoods newgoods);


    IPage<Map> selectGoods(Page<Goods> page, @Param("ew") QueryWrapper<Goods> queryWrapper);

    List<Goods> selectGname();

    Integer collectGoods(@Param("zid") Integer zid,@Param("sid") Integer sid,@Param("cid") String cid);

    Integer updateDeleted(@Param("zid") Integer zid,@Param("sid") Integer sid);

    IPage<Map> findAllCollect(Page page,@Param("ew")  QueryWrapper queryWrapper);

    Map findByShopIdCollect(@Param("cid") String cid, @Param("shopid") String shopid, @Param("goodsid") String goodsid);
}
